package com.car.controller;

import java.util.List;

import org.apache.shiro.authz.annotation.RequiresUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.car.entity.Storetable;
import com.car.service.CardetailstableService;
import com.car.service.StoretableService;

@RequestMapping("/cardetailstable/")
@Controller
public class Cardetailstable<T> {
	@Autowired
	StoretableService<T> storetableService ;
	@Autowired
	CardetailstableService cardetail;
	@RequestMapping("index")
	public String index(Model model){
		List<Storetable> store = storetableService.selectStore();
		model.addAttribute("store", store);
		return "cardetailstable";
	}
	@RequestMapping("storeCar")
	@ResponseBody
	public Object storeCar(int storeId){
		List<com.car.entity.Cardetailstable> store = cardetail.selectStoreCar(storeId);
		return  store;
	}
}
